class Router {
    constructor() {
        this.routes = [];
        this.auths = [];
    }

    auth(route, handler){
        this.auths.push({route: route, handler: handler});
    }

    /**
     * 
     * @param {String} route 
     * @param {Function} handler 
     */
    get(route, handler) {
        this.routes.push({ method: "GET", route: route, handler: handler });
    }

    /**
     * 
     * @param {String} route 
     * @param {Function} handler 
     */
    post(route, handler) {
        this.routes.push({ method: "POST", route: route, handler: handler });
    }

    /**
     * 
     * @returns {{method:String, route: String, handler: Function}}
     */
    getRoutes() {
        return this.routes;
    }
}

// const apollo = require('./config/apollo');

let route = new Router();

module.exports = route;